package com.bocloud.cmp.entity.resource;

import java.util.Date;

import org.springframework.format.annotation.DateTimeFormat;

import com.bocloud.common.utils.DateSerializer;
import com.bocloud.entity.annotations.Column;
import com.bocloud.entity.annotations.IgnoreAll;
import com.bocloud.entity.annotations.PK;
import com.bocloud.entity.annotations.Table;
import com.bocloud.entity.bean.GenericEntity;
import com.bocloud.entity.meta.PKStrategy;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;

/**
 * 告警实体类
 * 
 * @author songsong
 * @since 2017.3.7
 *
 */
@Table("alarm")
public class Alarm extends GenericEntity {

	@PK(value = PKStrategy.AUTO)
	private Long id; // ID
	@Column("level")
	private String level;// 警告等级
	@Column("alarm_val")
	private String alarmVal;// 告警的key值
	@Column("type")
	private String type;// 目标机器类型
	@Column("target")
	private String target;// 目标机器
	@Column("gmt_trigger")
	@JsonSerialize(using = DateSerializer.class)
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date gmtTrigger;// 告警触发时间
	@Column("gmt_confirm")
	@JsonSerialize(using = DateSerializer.class)
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date gmtConfirm;// 告警确认时间
	@Column("confirmer")
	private String confirmer;// 告警确认人
	@Column("vendor_id")
	private Long vendorId; // 云供应商Id
	@IgnoreAll
	private String vendorName; // 云供应商名称
	
    /**
	 * @return the id
	 */
	public Long getId() {
		return id;
	}

	/**
	 * @param id
	 *            the id to set
	 */
	public void setId(Long id) {
		this.id = id;
	}

	/**
	 * @return the level
	 */
	public String getLevel() {
		return level;
	}

	/**
	 * @param level
	 *            the level to set
	 */
	public void setLevel(String level) {
		this.level = level;
	}

	/**
	 * @return the alarmVal
	 */
	public String getAlarmVal() {
		return alarmVal;
	}

	/**
	 * @param alarmVal
	 *            the alarmVal to set
	 */
	public void setAlarmVal(String alarmVal) {
		this.alarmVal = alarmVal;
	}

	/**
	 * @return the type
	 */
	public String getType() {
		return type;
	}

	/**
	 * @param type
	 *            the type to set
	 */
	public void setType(String type) {
		this.type = type;
	}

	/**
	 * @return the target
	 */
	public String getTarget() {
		return target;
	}

	/**
	 * @param target
	 *            the target to set
	 */
	public void setTarget(String target) {
		this.target = target;
	}

	/**
	 * @return the gmtTrigger
	 */
	public Date getGmtTrigger() {
		return gmtTrigger;
	}

	/**
	 * @param gmtTrigger
	 *            the gmtTrigger to set
	 */
	public void setGmtTrigger(Date gmtTrigger) {
		this.gmtTrigger = gmtTrigger;
	}

	/**
	 * @return the gmtConfirm
	 */
	public Date getGmtConfirm() {
		return gmtConfirm;
	}

	/**
	 * @param gmtConfirm
	 *            the gmtConfirm to set
	 */
	public void setGmtConfirm(Date gmtConfirm) {
		this.gmtConfirm = gmtConfirm;
	}

	/**
	 * @return the confirmer
	 */
	public String getConfirmer() {
		return confirmer;
	}

	/**
	 * @param confirmer
	 *            the confirmer to set
	 */
	public void setConfirmer(String confirmer) {
		this.confirmer = confirmer;
	}

	/**
	 * @return the vendorId
	 */
	public Long getVendorId() {
		return vendorId;
	}

	/**
	 * @param vendorId
	 *            the vendorId to set
	 */
	public void setVendorId(Long vendorId) {
		this.vendorId = vendorId;
	}

	/**
	 * @return the vendorName
	 */
	public String getVendorName() {
		return vendorName;
	}

	/**
	 * @param vendorName
	 *            the vendorName to set
	 */
	public void setVendorName(String vendorName) {
		this.vendorName = vendorName;
	}

}
